package com.vichat.user.entity;


import javax.persistence.*;
import java.util.Date;
import java.util.List;

/***************
 *author: autogen
 *version: 2019-02-27 17:33:11.299
 */
@Entity
@Table(name = "system_message",catalog = "userdb")
public class SystemMessage implements java.io.Serializable{

	private static final long serialVersionUID = 1L;
	


    public static final String TABLE = "system_message";

    /**消息编号 */
	public static final String ALIAS_MSG_ID = "msg_id";
    /**消息类型 */
	public static final String ALIAS_MSG_TYPE = "msg_type";
    /**用户编号 */
	public static final String ALIAS_UID = "uid";
    /**消息内容 */
	public static final String ALIAS_MSG_CONTENT = "msg_content";
    /**特殊消息 */
	public static final String ALIAS_MSG_JSON = "msg_json";
    /**发送时间 */
	public static final String ALIAS_MSG_TIME = "msg_time";
    /**是否已读 */
	public static final String ALIAS_IS_READ = "is_read";
    /**是否接收  1已接收  0未接收 */
	public static final String ALIAS_IS_RECEIVE = "is_receive";
    /**显示方式 */
	public static final String ALIAS_SHOW_TYPE = "show_type";
    /** */
	public static final String ALIAS_CREATE_TIME = "create_time";
    /** */
	public static final String ALIAS_UPDATE_TIME = "update_time";
    /**数据 0 无效 1 有效 */
	public static final String ALIAS_STATE = "state";
    /**消息等级 1 普通消息 2 紧急消息 */
	public static final String ALIAS_MSG_LEVEL = "msg_level";
    /**消息对象编号 */
	public static final String ALIAS_OBJ_ID = "obj_id";
    /**消息对象类型 */
	public static final String ALIAS_OBJ_TYPE = "obj_type";
	
	

 	@Id
@   GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "msg_id", unique = true, nullable = false)
    public java.lang.Long msgId;
  
 	@Column(name = "msg_type")
    public java.lang.Long msgType;
  
 	@Column(name = "uid")
    public java.lang.Long uid;
  
 	@Column(name = "msg_content")
    public java.lang.String msgContent;
  
 	@Column(name = "msg_json")
    public java.lang.String msgJson;
  
 	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "msg_time")
    public java.util.Date msgTime;
  
 	@Column(name = "is_read")
    public java.lang.Long isRead;
  
 	@Column(name = "is_receive")
    public java.lang.Long isReceive;
  
 	@Column(name = "show_type")
    public java.lang.Long showType;
  
 	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time")
    public java.util.Date createTime;
  
 	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time")
    public java.util.Date updateTime;
  
 	@Column(name = "state")
    public java.lang.Long state = 1l;
  
 	@Column(name = "msg_level")
    public java.lang.Long msgLevel;
  
 	@Column(name = "obj_id")
    public java.lang.Long objId;
  
 	@Column(name = "obj_type")
    public java.lang.Long objType;
  





	public java.lang.Long getMsgId() {
		return this.msgId;
	}
	
	public void setMsgId(java.lang.Long value) {
		this.msgId = value;
	}

	public java.lang.Long getMsgType() {
		return this.msgType;
	}
	
	public void setMsgType(java.lang.Long value) {
		this.msgType = value;
	}

	public java.lang.Long getUid() {
		return this.uid;
	}
	
	public void setUid(java.lang.Long value) {
		this.uid = value;
	}

	public java.lang.String getMsgContent() {
		return this.msgContent;
	}
	
	public void setMsgContent(java.lang.String value) {
		this.msgContent = value;
	}

	public java.lang.String getMsgJson() {
		return this.msgJson;
	}
	
	public void setMsgJson(java.lang.String value) {
		this.msgJson = value;
	}

	public java.util.Date getMsgTime() {
		return this.msgTime;
	}
	
	public void setMsgTime(java.util.Date value) {
		this.msgTime = value;
	}

	public java.lang.Long getIsRead() {
		return this.isRead;
	}
	
	public void setIsRead(java.lang.Long value) {
		this.isRead = value;
	}

	public java.lang.Long getIsReceive() {
		return this.isReceive;
	}
	
	public void setIsReceive(java.lang.Long value) {
		this.isReceive = value;
	}

	public java.lang.Long getShowType() {
		return this.showType;
	}
	
	public void setShowType(java.lang.Long value) {
		this.showType = value;
	}

	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	
	public void setCreateTime(java.util.Date value) {
		this.createTime = value;
	}

	public java.util.Date getUpdateTime() {
		return this.updateTime;
	}
	
	public void setUpdateTime(java.util.Date value) {
		this.updateTime = value;
	}

	public java.lang.Long getState() {
		return this.state;
	}
	
	public void setState(java.lang.Long value) {
		this.state = value;
	}

	public java.lang.Long getMsgLevel() {
		return this.msgLevel;
	}
	
	public void setMsgLevel(java.lang.Long value) {
		this.msgLevel = value;
	}

	public java.lang.Long getObjId() {
		return this.objId;
	}
	
	public void setObjId(java.lang.Long value) {
		this.objId = value;
	}

	public java.lang.Long getObjType() {
		return this.objType;
	}
	
	public void setObjType(java.lang.Long value) {
		this.objType = value;
	}


	
	public SystemMessage() {
	}
	
	public SystemMessage(boolean qryflag) {
	    if(qryflag){
	    		this.msgId = null;
				this.msgType = null;
				this.uid = null;
				this.msgContent = null;
				this.msgJson = null;
				this.msgTime = null;
				this.isRead = null;
				this.isReceive = null;
				this.showType = null;
				this.createTime = null;
				this.updateTime = null;
				this.state = null;
				this.msgLevel = null;
				this.objId = null;
				this.objType = null;
			    }
	}


	public SystemMessage(
	    java.lang.Long inMsgId,
	    java.lang.Long inMsgType,
	    java.lang.Long inUid,
	    java.lang.String inMsgContent,
	    java.lang.String inMsgJson,
	    java.util.Date inMsgTime,
	    java.lang.Long inIsRead,
	    java.lang.Long inIsReceive,
	    java.lang.Long inShowType,
	    java.util.Date inCreateTime,
	    java.util.Date inUpdateTime,
	    java.lang.Long inState,
	    java.lang.Long inMsgLevel,
	    java.lang.Long inObjId,
		java.lang.Long inObjType
	 ) {
		super();
				this.msgId = inMsgId;
				this.msgType = inMsgType;
				this.uid = inUid;
				this.msgContent = inMsgContent;
				this.msgJson = inMsgJson;
				this.msgTime = inMsgTime;
				this.isRead = inIsRead;
				this.isReceive = inIsReceive;
				this.showType = inShowType;
				this.createTime = inCreateTime;
				this.updateTime = inUpdateTime;
				this.state = inState;
				this.msgLevel = inMsgLevel;
				this.objId = inObjId;
				this.objType = inObjType;
			}


	@Transient
	private Date startDate;
	@Transient
	private Date endDate;

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	@Transient
	private List<Long> msgIds;

	public List<Long> getMsgIds() {
		return msgIds;
	}

	public void setMsgIds(List<Long> msgIds) {
		this.msgIds = msgIds;
	}

	@Transient
	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}

